/*
if(window.location.host != "128.128.96.2:9001"){
	var locStr = window.location.href;
	var locStr = locStr.substr(0,locStr.lastIndexOf("/")) + "/demo" +locStr.substr(locStr.lastIndexOf("/"),locStr.length);
	window.location.href=locStr;
}
*/
function BROWSER(){
	var Browser_Name=navigator.appName;
	var Browser_Version=parseFloat(navigator.appVersion);
	var Browser_Agent=navigator.userAgent;
	var Actual_Version,Actual_Name;
	var is_IE=(Browser_Name=="Microsoft Internet Explorer");
	var is_NN=(Browser_Name=="Netscape");
	var is_op=(Browser_Name=="Opera");
	if(is_NN){
		if(Browser_Version>=5.0){
			if(Browser_Agent.indexOf("Netscape")!=-1){
				var Split_Sign=Browser_Agent.lastIndexOf("/");
				var Version=Browser_Agent.lastIndexOf(" ");
				var Bname=Browser_Agent.substring(0,Split_Sign);
				var Split_sign2=Bname.lastIndexOf(" ");
				Actual_Version=Browser_Agent.substring(Split_Sign+1,Browser_Agent.length);
				Actual_Name=Bname.substring(Split_sign2+1,Bname.length);
			}
			if(Browser_Agent.indexOf("Firefox")!=-1){
				var Version=Browser_Agent.lastIndexOf("Firefox");
				Actual_Version=Browser_Agent.substring(Version + 8,Browser_Agent.length);
				Actual_Name=Browser_Agent.substring(Version,Version + 7);
			}
			if(Browser_Agent.indexOf("Safari")!=-1){
				if(Browser_Agent.indexOf("Chrome")!=-1){
					var Split_Sign=Browser_Agent.lastIndexOf(" ");
					var Version=Browser_Agent.substring(0,Split_Sign);
					var Split_Sign2=Version.lastIndexOf("/");
					var Bname=Version.lastIndexOf(" ");
					Actual_Version=Version.substring(Split_Sign2+1,Version.length);
					Actual_Name=Version.substring(Bname+1,Split_Sign2);
				}else{
					var Split_Sign=Browser_Agent.lastIndexOf("/");
					var Version=Browser_Agent.substring(0,Split_Sign);
					var Split_Sign2=Version.lastIndexOf("/");
					var Bname=Browser_Agent.lastIndexOf(" ");
					Actual_Version=Browser_Agent.substring(Split_Sign2+1,Bname);
					Actual_Name=Browser_Agent.substring(Bname+1,Split_Sign);
				}
			}
			if(Browser_Agent.indexOf("Mozilla")!=-1){
				var Split_Sign=Browser_Agent.lastIndexOf("/");
				var Version=Browser_Agent.lastIndexOf(" ");
				var Bname=Browser_Agent.substring(0,Split_Sign);
				var Split_sign2=Bname.lastIndexOf(" ");
				Actual_Version=Browser_Agent.substring(Split_Sign+1,Browser_Agent.length);
				Actual_Name=Bname.substring(Split_sign2+1,Bname.length);
			}
		}else{
			Actual_Version=Browser_Version;
			Actual_Name=Browser_Name;
		}
	}else if(is_IE){
		var Version_Start=Browser_Agent.indexOf("MSIE");
		var Version_End=Browser_Agent.indexOf(";",Version_Start);
		Actual_Version=Browser_Agent.substring(Version_Start+5,Version_End)
		Actual_Name=Browser_Name;
            
		if(Browser_Agent.indexOf("Maxthon")!=-1||Browser_Agent.indexOf("MAXTHON")!=-1){
			var mv=Browser_Agent.lastIndexOf(" ");
			var mv1=Browser_Agent.substring(mv,Browser_Agent.length-1);
            mv1="遨游版本:"+mv1;
			Actual_Name+="(Maxthon)";
			Actual_Version+=mv1;
		}
	}else if(Browser_Agent.indexOf("Opera")!=-1){
		Actual_Name="Opera";
		var tempstart=Browser_Agent.indexOf("Opera");
		var tempend=Browser_Agent.length;
		Actual_Version=Browser_Version;
	}else{
		Actual_Name="Unknown Navigator"
		Actual_Version="Unknown Version"
	}

	navigator.Actual_Name=Actual_Name;
	navigator.Actual_Version=Actual_Version;
        
	this.Name=Actual_Name;
	this.Version=Actual_Version;
	this.isFirefox=function(){
		if(Actual_Name.indexOf("Firefox")==-1)
			return false;
		else
			return true;
	}
	this.isSafari=function(){
		if(Actual_Name.indexOf("Safari")==-1)
			return false;
		else
			return true;
	}
	this.isChrome=function(){
		if(Actual_Name.indexOf("Chrome")==-1)
			return false;
		else
			return true;
		}
}


var BROWSER = new BROWSER();

var isCurrIE9 = (navigator.userAgent.toLowerCase().indexOf("msie 9.0") != -1);
var isCurrIE8 = (navigator.userAgent.toLowerCase().indexOf("msie 8.0") != -1);
var isCurrIE6=(navigator.userAgent.toLowerCase().indexOf("msie 6.0") != -1);
var isCurrIE7=(navigator.userAgent.toLowerCase().indexOf("msie 7.0") != -1);
var Browser_Name=navigator.appName;
var is_IE=(Browser_Name=="Microsoft Internet Explorer");//判读是否为ie浏览器

function __firefox(){
    HTMLElement.prototype.__defineGetter__("runtimeStyle", __element_style);
    window.constructor.prototype.__defineGetter__("event", __window_event);
    Event.prototype.__defineGetter__("srcElement", __event_srcElement);
    HTMLElement.prototype.__defineGetter__("children",__element_children);
    HTMLElement.prototype.__defineGetter__("innerText",__element_innerText);
    HTMLElement.prototype.__defineSetter__("innerText",function(sText){this.textContent=sText;} );
    HTMLElement.prototype.__defineGetter__("outerHTML",function() 
    { 
        var a=this.attributes, str="<"+this.tagName, i=0;for(;i<a.length;i++) 
        if(a[i].specified) 
            str+=" "+a[i].name+'="'+a[i].value+'"'; 
        if(!this.canHaveChildren) 
            return str+" />"; 
        return str+">"+this.innerHTML+"</"+this.tagName+">"; 
    }); 
    HTMLElement.prototype.__defineSetter__("outerHTML",function(s) 
    { 
        var r = this.ownerDocument.createRange(); 
        r.setStartBefore(this); 
        var df = r.createContextualFragment(s); 
        this.parentNode.replaceChild(df, this); 
        return s; 
    }); 
    HTMLElement.prototype.__defineGetter__("canHaveChildren",function() 
    { 
        return !/^(area|base|basefont|col|frame|hr|img|br|input|isindex|link|meta|param)$/.test(this.tagName.toLowerCase()); 
    }); 

}
function __element_style(){
    return this.style;
}
function __window_event(){
    return __window_event_constructor();
}
function __event_srcElement(){
    return this.target;
}
function __window_event_constructor(){
    if(!BROWSER.isFirefox()){
        return window.event;
    }
    var _caller = __window_event_constructor.caller;
    while(_caller!=null){
        var _argument = _caller.arguments[0];
        if(_argument){
            var _temp = _argument.constructor;
            if(_temp.toString().indexOf("Event")!=-1){
                return _argument;
            }
        }
        _caller = _caller.caller;
    }
    return null;
}
function __element_children(){
	var returnValue = new Object();     
    var number = 0;     
    for (var i=0; i<this.childNodes.length; i++) {     
         if (this.childNodes[i].nodeType == 1) {     
                  returnValue[number] = this.childNodes[i];     
                  number++;     
                  }     
              }     
    returnValue.length = number;     
    return returnValue;     
}
function __element_innerText(){
	return this.textContent;
}

if(BROWSER.isFirefox()){
    __firefox();
}

function $(str){
	return document.getElementById(str);
}

function showTXHead(menu_name,sub_menu_names){
	
	var startIndex_c = sub_menu_names.indexOf("［");
	var startIndex_e = sub_menu_names.indexOf("[");
	var startIndex = -1;
	if(startIndex_c != -1 && (startIndex_c < startIndex_e || startIndex_e == -1)){
		startIndex = startIndex_c;
	}else{
		startIndex = startIndex_e;
	}
	
	var endIndex_c = sub_menu_names.indexOf("］");
	var endIndex_e = sub_menu_names.indexOf("]");
	var endIndex = -1;
	if(endIndex_c != -1 && (endIndex_c < endIndex_e || endIndex_e == -1)){
		endIndex = endIndex_c;
	}else{
		endIndex = endIndex_e;
	}

	var arrayMenu = new Array();
	var i = 0;
	while(startIndex != -1 && endIndex != -1){
		arrayMenu[i] = sub_menu_names.substring(startIndex + 1,endIndex);
		
		startIndex_c = sub_menu_names.indexOf("［", endIndex);
		startIndex_e = sub_menu_names.indexOf("[", endIndex);
		if(startIndex_c != -1 && (startIndex_c < startIndex_e || startIndex_e == -1)){
			startIndex = startIndex_c;
		}else{
			startIndex = startIndex_e;
		}

		endIndex_c = sub_menu_names.indexOf("］", endIndex + 1);
		endIndex_e = sub_menu_names.indexOf("]", endIndex + 1);
		if(endIndex_c != -1 && (endIndex_c < endIndex_e || endIndex_e == -1)){
			endIndex = endIndex_c;
		}else{
			endIndex = endIndex_e;
		}

		i++;
	}

	if(0 != arrayMenu.length){
		var tmp_str = '<ul class="page_tab">'
		var reg = /<(\s*)(a|A)(.*)>.*<(\s*)\/(\s*)(a|A)(\s*)>/;
		for(i = 0; i < arrayMenu.length; i++){
			if(arrayMenu[i] == '<br>'){
				tmp_str += '</ul>';
				tmp_str += '<ul class="page_tab">';
				continue;
			}
			if(reg.test(arrayMenu[i])){
				tmp_str += '<li><span></span>'+ arrayMenu[i] + '</li>';
			}else{
				tmp_str += '<li id="page_tab_current"><span></span><a>'+ arrayMenu[i] +'</a></li>';
			}
		}
		tmp_str += '</ul>';
		document.writeln(tmp_str);
	}
	
	if(null!=document.getElementById('txTitle')){
		var menu_name
		try{
			if(window.parent.taskBar != undefined && window.parent.taskBar != null && window.parent.taskBar.getMenuNav() != null && window.parent.taskBar.getMenuNav() != ''){
				menu_name = window.parent.taskBar.getMenuNav();
				var fstpart = menu_name.substring(0, menu_name.lastIndexOf('>'));
				var sedpart =menu_name.substring(menu_name.lastIndexOf('>'), menu_name.length);
				document.getElementById('txTitle').innerHTML = '<p><b class="h_o">' + fstpart + '</b><b class="h_o_t">' + sedpart + '</b></p>'
			}else if(menu_name != null && menu_name != ''){
				document.getElementById('txTitle').innerHTML = '<p><b class="h_o">' + menu_name + '</b></p>'
			}
		}catch(e){
			if(menu_name != null && menu_name != ''){
				document.getElementById('txTitle').innerHTML = '<p><b class="h_o">' + menu_name + '</b></p>'
			}
		}
		
	}
}

function showHead(){
	var tmp_str='<div class="area_title" id="txTitle">';
		tmp_str+='    ';
		tmp_str+='    </div>';
		tmp_str+='<table width="100%" border="0" cellspacing="0" cellpadding="0">';
		tmp_str+='      <tr>';
		tmp_str+='        <td>';
		tmp_str+='          <table style="margin-right:10px;margin-left:10px;" width="99%" border="0" cellspacing="0" cellpadding="5">';
		tmp_str+='            <tr>';
		tmp_str+='              <td style="padding-top:5px;*+padding-top:10px;">';
	document.writeln(tmp_str);
}

function showFooter(){
	var tmp_str='</td></tr></table></td></tr></table>';
	document.writeln(tmp_str);
	initDoc();
	checkGoBack();
}

var submitFlag=0;
function go() {
	if((typeof check) == "undefined"||null==check||check()){
		sForms = document.forms[0]
		for (var w = 0 ; w < sForms.length ; w++){
			var Bu = sForms.elements[w].type;//
			var LC = Bu.toLowerCase()
			if(LC=='submit'||LC=='button'||LC=='reset'){
				var cssName = sForms.elements[w].className;
				if(cssName.indexOf("_dis") == -1){
					sForms.elements[w].className = sForms.elements[w].className + "_dis";
				}
			}
		}
		if(submitFlag==0){
			submitFlag=1;
			markManipulated();
			return true;
		}else{
			return false;
		}
	}
	return false;
}

function commonLoads(){
}
function commonUnloads(){}
function commonBeforeUnloads(){}

function selectFirstRadio(elementName) {

	var rads = document.getElementsByName(elementName);
			
	if (rads.length>0) {
		rads[0].click();
	}
			
}

function setSecondSelected(selname)
{
	var sel=document.getElementById(selname);
	if(sel.options.length==2){
		sel.value=sel.options[1].value;
	} 
}

function formatAcc(obj,splitAcc,splitAcc1){
	var realV=document.getElementById(splitAcc);
	realV.value=obj.value.replace(/\s*/g, "");
	document.getElementById(splitAcc1).value=realV.value;
	var str=realV.value;
	var temp="";
	for(var i=0;i<str.length;i++){		
		temp=temp+str.substring(i,i+1);
		if(i!=0&&(i+1)%4==0&&i!=(str.length-1)){	
			temp=temp+" ";
			}
	}	
	obj.value=temp;
}

function checkFloat(val) { 
	var re = /^(-?\d+)(\.\d+)?$/g;
	if(re.test(val)) {
		return true;
	} else {
		return false;
	}
}

function AmountInWords(dValue, maxDec) 
{
    dValue = dValue.toString().replace(/,/g, "");  dValue = dValue.replace(/^0+/, "");  
    if (dValue == "") { return "零元整"; } 
    else if (isNaN(dValue)) { return "错误：金额不是合法的数值！"; } 
    
    var minus = "";                     
    var CN_SYMBOL = "";
    if (dValue.length > 1) {
        if (dValue.indexOf('-') == 0) { dValue = dValue.replace("-", ""); minus = "负"; }
        if (dValue.indexOf('+') == 0) { dValue = dValue.replace("+", ""); } 
    }
    
    var vInt = ""; var vDec = ""; 
    var resAIW;
    var parts;
    var digits, radices, bigRadices, decimals;
    var zeroCount;
    var i, p, d;
    var quotient, modulus; 

    var NoneDecLen = (typeof(maxDec) == "undefined" || maxDec == null || Number(maxDec) < 0 || Number(maxDec) > 5);   
    parts = dValue.split('.'); 
    if (parts.length > 1) {
        vInt = parts[0]; vDec = parts[1]; 
        
        if(NoneDecLen) { maxDec = vDec.length > 5 ? 5 : vDec.length; }  
        var rDec = Number("0." + vDec);     
        rDec *= Math.pow(10, maxDec); rDec = Math.round(Math.abs(rDec)); rDec /= Math.pow(10, maxDec);
        var aIntDec = rDec.toString().split('.');
        if(Number(aIntDec[0]) == 1) { vInt = (Number(vInt) + 1).toString(); } 
        if(aIntDec.length > 1) { vDec = aIntDec[1]; } else { vDec = ""; }
    } else {
		vInt = dValue;
		vDec = ""; 
		if(NoneDecLen) {
			maxDec = 0; 
		}
	} 
    if(vInt.length > 44) { 
		return "错误：金额值太大了！整数位长【" + vInt.length.toString() + "】超过了上限——44位/千正/10^43（注：1正=1万涧=1亿亿亿亿亿，10^40）！";
	}
    
    digits = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖");
    radices = new Array("", "拾", "佰", "仟"); 
    bigRadices = new Array("", "万", "亿", "兆", "京", "垓", "杼", "穰" ,"沟", "涧", "正"); 
    decimals = new Array("角", "分", "厘", "毫", "丝"); 
    
    resAIW = ""; 
    
    if (Number(vInt) > 0) {
        zeroCount = 0;
        for (i = 0; i < vInt.length; i++) {
            p = vInt.length - i - 1; d = vInt.substr(i, 1); quotient = p / 4; modulus = p % 4;
            if (d == "0") {
				zeroCount++; 
			} else {
                if (zeroCount > 0) { resAIW += digits[0]; }
                zeroCount = 0; resAIW += digits[Number(d)] + radices[modulus];
            }
            if (modulus == 0 && zeroCount < 4) { resAIW += bigRadices[quotient]; }
        }
        resAIW += "元";
    }
    
   
    for (i = 0; i < vDec.length; i++) { d = vDec.substr(i, 1); if (d != "0") { resAIW += digits[Number(d)] + decimals[i]; } }
    

    if (resAIW == "") { resAIW = "零" + "元"; } 
    if (vDec == "") { resAIW += "整"; } 
    resAIW = CN_SYMBOL + minus + resAIW; 
    return resAIW;
    
} 


//鼠标经过改变表中一行的颜色
function tdOver(tr){
	tr.className="ccb_table_tr_select";
}
//鼠标经过还原表中行的颜色
function tdOut(tr){
	tr.className="";
}

/* 使用输入框和按钮，模拟上传控件的行为。
*  textObjId：输入框的id,用从上传控件中获取上传的文件路径显示在本输入框中
*  uploadObjId：上传控件id,必须以这个控件的name和value作为输入form提交的内容
*/
function fileUploadClick(textObjId, uploadObjId){
	var textObj = document.getElementById(textObjId);
	var uploadObj = document.getElementById(uploadObjId);
	
	uploadObj.click();
	
	textObj.value = uploadObj.value;
	
}

/* 
*  naviStepTitle：步骤导航的标题名称
*  naviSetpArray：步骤导航的步骤文字数组
*  naviStepNumer：那一步设置为当前步骤，从0开始，最大值为naviSetpArray.length
*/
function showNaviSetp(naviStepTitle, naviSetpArray, naviStepNumer){
	return;
	var tmp_str='<dl class="process_h">';
	tmp_str+='<dt>' + naviStepTitle + '</dt>';
	for(var i=0; i < naviSetpArray.length; i++){
		if(	i == naviStepNumer){
			tmp_str+='<dd id="naviSetp_'+ i +'" class="process_h_current">' + naviSetpArray[i] + '</dd>';
		}else{
			tmp_str+='<dd id="naviSetp_'+ i +'">' + naviSetpArray[i] + '</dd>';
		}
	}
	tmp_str+='</dl>';
		
	document.writeln(tmp_str);		
}
/* 
*  naviStepTableArray：步骤导航的表格的id数组
*   naviStepNumer：那一步设置为当前步骤的表格，从0开始，最大值为naviStepTableArray.length
*/
function naviSetpChange(naviStepTableArray, naviStepNumer){
	return;
	for(var i=0; i<naviStepTableArray.length; i++){
		if(i == naviStepNumer){
			document.getElementById(naviStepTableArray[i]).className = 'ccb_form_normal ccb_form_normal_click'
			break;
		}else{
			document.getElementById(naviStepTableArray[i]).className = 'ccb_form_normal ccb_form_normal_click'
		}
	}
	for(var i=0; i<naviStepTableArray.length; i++){
		if(i == naviStepNumer){
			document.getElementById("naviSetp_"+ i).className = "process_h_current";
		}else{
			//document.getElementById(naviStepTableArray[i]).className = 'ccb_form_normal'
			document.getElementById("naviSetp_"+ i).className = "";
		}
	}
}

function openCCBWindow(src, param2, openType){
	if(openType == 1){
		window.showModalDialog(src, param2, 'dialogHeight:230px;dialogWidth:350px;status:off');
		
	}else if(openType == 2){
		window.open(src, param2,'height=230px,width=350px,top=180px,left=400px,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');
		
	}else if(openType == 3){
		window.showModelessDialog(src, param2, 'dialogHeight:230px;dialogWidth:350px;status:off');
		
	}else{
		window.open(src, param2, 'height=230px,width=350px,top=180px,left=400px,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');
	}
}

function closeCCBWindow(){
	window.close();
}


function openTxWindow(src, param2, openType, winHeight, winWidth){
	if(openType == 1){
		window.showModalDialog(src, param2, 'dialogHeight:'+ winHeight +'px;dialogWidth:'+ winWidth +'px;status:off');
		
	}else if(openType == 2){
		window.open(src, param2,'height='+ winHeight +'px,width='+ winWidth +'px,top=180px,left=400px,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');
		
	}else if(openType == 3){
		window.showModelessDialog(src, param2, 'dialogHeight:'+ winHeight +'px;dialogWidth:'+ winWidth +'px;status:off');
		
	}else{
		window.open(src, param2, 'height=230px,width=350px,top=180px,left=400px,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');
	}
}

function closeTxWindow(){
	window.close();
}

function showTXWinHead(title){
	var strtmp = '<div class="txwin_head">';
		strtmp+= '<img src="../../images6/txwin_logo.gif"/>';
		strtmp+= '</div>';
		strtmp+= '<div class="txwin_content">';
		strtmp+= '<h2>'+title+'</h2>';
	document.writeln(strtmp);
}

function showTXWinFooter(){
	var strtmp = '</div>';
	document.writeln(strtmp);
	initDoc();
}
var naviSetpId = [];
function initDoc(){
var eles = document.getElementsByTagName('div');
	for(var i=0; i<eles.length; i++){
		var ele = eles[i];
		if(ele.className == 'tip_correct' || ele.className == 'tip_remind'){
			ele.outerHTML = '<div class="boxroundCorner"><div class="one_top one_top3"><span class="f_zh f_zh2">提示</span></div>' + ele.outerHTML + '</div>';
			i+=2;
		}else if(ele.className == 'bottom_tip'){
			ele.outerHTML = '<div class="boxroundCorner boxroundCorner3"><div class="one_top21"><span class="f_zh f_zh2">温馨提示</span></div>' + ele.outerHTML + '</div>';
			i+=2;
		}
	}
	eles = document.getElementsByTagName('table');
	for(i=0; i<eles.length; i++){
		ele = eles[i];
		if(ele.className == 'ccb_table_normal' || ele.className == 'ccb_form_normal' || ele.className == 'ccb_table_confirm' || ele.className == 'ccb_table_list'){
			var tableId = ele.id
			ele.outerHTML = '<div class="boxroundCorner" id="_'+ tableId +'_div">' + ele.outerHTML + '</div>';
		}
	}
}

function hideTable(tableId){
	document.getElementById("_"+tableId+"_div").style.display='none';
}

function showTable(tableId){
	document.getElementById("_"+tableId+"_div").style.display='';
}

var naviTime = (new Date()).getTime();
function wirteNaviSetp(step, text){
	var rep = /\d/;
	if(!rep.test(step)){
		return;
	}
	var id = naviTime++;
	var str='<div id="'+ id +'" class="naviDiv"><div class="naviLeftNumber"><span class="naviNumber">'+ step +'</span></div><div class="naviRight"><p class="naviText">'+ text +'</p></div></div>';
	document.write(str);
	var obj = document.getElementById(id);
	obj.parentNode.className="naviSetp";
}
function wirteTableHead(text){
	var id = naviTime++;
	var str='<div id="'+ id +'" class="naviDiv"><div class="naviLeft"></div><div class="naviRight"><p class="naviText">'+ text +'</p></div></div>';
	document.write(str);
	var obj = document.getElementById(id);
	obj.parentNode.className="naviSetp";
}

function getFristElementNode(obj){
	if(obj == null || obj.childNodes == null || obj.childNodes.length == null || obj.childNodes.length == 0){
		return null;
	}
	
	for(var i = 0; i < obj.childNodes.length; i++){
		if(obj.childNodes[i].nodeType == 1){
			return obj.childNodes[i];
		}
	}
	return null;
}

function elementClick(element){
	if(element == null){
		return;
	}
	if(BROWSER.isFirefox()||BROWSER.isSafari()||BROWSER.isChrome()){
		var evt = document.createEvent("MouseEvents");
		evt.initEvent("click",true,true);
		element.dispatchEvent(evt);
	}else{
		element.click();
	}
}

function fileInputElement(id,name){
		var str = "<div class='button_file_box'>";
		str +=  "<input type='text' name='FITxt_" + name + "' id='FITxt_" + id + "' class='input_small' readonly/>&nbsp;";
		str += "<input type='button' name='FIBtn_" + name + "' id='FIBtn_" + id + "' class='button_upLoad' value='浏览'/>";
		str += "<input size='1' type='file' name='"+ name + "' id='" + id + "' class='button_file' onChange='document.getElementById(\"FITxt_"+id+"\").value=this.value;' hidefocus='hidefocus'/>";
		str += "</div>";
		document.writeln(str);
}

String.prototype.trim = function() 
{
	return this.replace(/(^\s*)|(\s*$)/g,""); 
}

function findMainFrame(){
	return parent;
}

function disableButton(buttonId){
	buttonId.className = buttonId.className + "_dis";
	buttonId.disabled=true;
}

function ableButton(buttonId){
	buttonId.className = buttonId.className.replace("_dis","");
	buttonId.disabled=false;
}

function menuClick(menuId, txcode, addPara, actionType){
	if(window.parent || window.parent.doument){	
		if(typeof(window.parent.openMenuWin) ==  "function"){
			window.parent.openMenuWin(menuId, txcode, addPara, actionType);
		}
	}
}

function checkGoBack(){
	try{
		if(null != window.parent.taskBar && undefined != window.parent.taskBar){
			if(window.parent.taskBar.isNewWin() == "true"){
				window.parent.taskBar.setOldWin();
				killgoBack();
			}
		}
	}catch(e){
		//DONOTHING
	}
}

window.killgoBack = function(){
	var inputs = document.getElementsByTagName("input");
	for (var w = 0 ; w < inputs.length ; w++){
		var btnType = inputs[w].type;//
		var btnType = btnType.toLowerCase()
		if(btnType=='submit'||btnType=='button'||btnType=='reset'){
			var inputHtml = inputs[w].outerHTML.toLowerCase();
			var index = inputHtml.indexOf("back(");
			if( -1 != index){
				try{
					var preChar = inputHtml.charAt(index - 1);
					var reg = /\W/;
					if(reg.test(preChar)){
						inputs[w].style.display = "none";
					}
				}catch(e){
					//donothing;
				}
			}
			if(-1 != inputHtml.indexOf("history.")){
				inputs[w].style.display = "none";
			}
		}
	}
}

function markManipulated(){
	try{
		if(null != window.parent.taskBar && undefined != window.parent.taskBar && typeof(window.parent.taskBar.beManipulated) == "function"){
			window.parent.taskBar.beManipulated();
		}
	}catch(e){
		//DONOTHING
	}
}
function getMenuTypeId(){
	if(null != window.parent.menuTypeId && undefined != window.parent.menuTypeId){
		return window.parent.menuTypeId;
	}else{
		return null;
	}
}






function getCustFontType(){
	if(null != window.parent.custFontType && undefined != window.parent.custFontType){
		return window.parent.custFontType;
	}else{
		return "default";
	}
}
window.custFontType = null;
window.setFontType = function(){
	var fontType = getCustFontType();
	window.custFontType = fontType;
	if(fontType == "big"){
		var head = document.getElementsByTagName( 'head' )[0];
		var headChildrens = head.children;
		var ishasCss = false;
		for(var i=0; i<headChildrens.length; i++){
			if(headChildrens[i].tagName.toUpperCase() == "LINK" && headChildrens[i].href.indexOf('ccb6_2.css') != -1){
				ishasCss = true;
				continue;
			}
			if(headChildrens[i].tagName.toUpperCase() == "LINK" && (headChildrens[i].href.indexOf('ccb6.css') != -1 || headChildrens[i].href.indexOf('ccb6_1.css') != -1)){
				head.removeChild(headChildrens[i]);
			}
		}
		if(!ishasCss){
			var styleLink = document.createElement('link');
			var linkAttr = document.createAttribute('href');
			linkAttr.value = '../../css6/ccb6_2.css';
			styleLink.setAttributeNode(linkAttr);
			var linkRel = document.createAttribute('rel');
			linkRel.value = 'stylesheet';
			styleLink.setAttributeNode(linkRel);
			var linkType = document.createAttribute('type');
			linkType.value = 'text/css';
			styleLink.setAttributeNode(linkType);
			( document.getElementsByTagName( 'head' )[0] || document.body ).appendChild( styleLink );
		}
	}
	if(fontType == "default"){
		var head = document.getElementsByTagName( 'head' )[0];
		var headChildrens = head.children;
		var ishasCss = false;
		for(var i=0; i<headChildrens.length; i++){
			if(headChildrens[i].tagName.toUpperCase() == "LINK" && headChildrens[i].href.indexOf('ccb6.css') != -1){
				ishasCss = true;
				continue;
			}
			if(headChildrens[i].tagName.toUpperCase() == "LINK" && (headChildrens[i].href.indexOf('ccb6_2.css') != -1 || headChildrens[i].href.indexOf('ccb6_1.css') != -1)){
				head.removeChild(headChildrens[i]);
			}
		}
		if(!ishasCss){
			var styleLink = document.createElement('link');
			var linkAttr = document.createAttribute('href');
			linkAttr.value = '../../css6/ccb6.css';
			styleLink.setAttributeNode(linkAttr);
			var linkRel = document.createAttribute('rel');
			linkRel.value = 'stylesheet';
			styleLink.setAttributeNode(linkRel);
			var linkType = document.createAttribute('type');
			linkType.value = 'text/css';
			styleLink.setAttributeNode(linkType);
			( document.getElementsByTagName( 'head' )[0] || document.body ).appendChild( styleLink );
		}
		
	}
	if(fontType == "small"){
		var head = document.getElementsByTagName( 'head' )[0];
		var headChildrens = head.children;
		var ishasCss = false;
		for(var i=0; i<headChildrens.length; i++){
			if(headChildrens[i].tagName.toUpperCase() == "LINK" && headChildrens[i].href.indexOf('ccb6_1.css') != -1){
				ishasCss = true;
				continue;
			}
			if(headChildrens[i].tagName.toUpperCase() == "LINK" && (headChildrens[i].href.indexOf('ccb6.css') != -1 || headChildrens[i].href.indexOf('ccb6_2.css') != -1)){
				head.removeChild(headChildrens[i]);
			}
			
		}
		if(!ishasCss){
			var styleLink = document.createElement('link');
			var linkAttr = document.createAttribute('href');
			linkAttr.value = '../../css6/ccb6_1.css';
			styleLink.setAttributeNode(linkAttr);
			var linkRel = document.createAttribute('rel');
			linkRel.value = 'stylesheet';
			styleLink.setAttributeNode(linkRel);
			var linkType = document.createAttribute('type');
			linkType.value = 'text/css';
			styleLink.setAttributeNode(linkType);
			( document.getElementsByTagName( 'head' )[0] || document.body ).appendChild( styleLink );
		}
	}
}